package demo3;

public class Test1 {
    public static void main(String[] args) {
        String string = "zasdfghjasdfqqw";
        boolean[] nums = new boolean[126];
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < string.length(); i++) {
            if (nums[string.charAt(i)] == false) {
                stringBuilder.append(string.charAt(i));
                nums[string.charAt(i)] = true;
            }
        }
        System.out.println(stringBuilder.toString());

    }

}
